﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display.aswingui {
    import flash.display.*;
    import org.aswing.*;
    import org.aswing.geom.*;
    import org.aswing.graphics.*;

    public class MarginBackground extends AssetBackground {

        private var margin:Insets;

        public function MarginBackground(_arg1:DisplayObject, _arg2:Insets=null){
            super(_arg1);
            if (_arg2 != null){
                this.margin = _arg2;
            } else {
                this.margin = new Insets(0, 0, 0, 0);
            };
        }
        override public function updateDecorator(_arg1:Component, _arg2:Graphics2D, _arg3:IntRectangle):void{
            asset.x = (_arg3.x + this.margin.left);
            asset.y = (_arg3.y + this.margin.top);
            asset.width = (_arg3.width - (this.margin.left + this.margin.right));
            asset.height = (_arg3.height - (this.margin.top + this.margin.bottom));
        }

    }
}//package Display.aswingui 
